package com.jsoft.dao.impl;

import com.jsoft.dao.TicketOpenDao;
import com.jsoft.entity.TicketOpen;
import com.jsoft.utils.DAO;

/**
 * @author snkstart
 * @create 2023-02-21 15:34
 */
public class TicketOpenDaoImpl extends DAO<TicketOpen> implements TicketOpenDao {

    @Override
    public int save(TicketOpen ticketOpen) throws Exception {
        String sql="INSERT INTO ticket_open (NO,enterprise_id,acquirer_enterprise_id,amount,instituty_id,create_time,expiry_time,payment_interest_type,`status`,uplink_address,remark) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
        return update(sql,ticketOpen.getNo(),ticketOpen.getEnterpriseId(),ticketOpen.getAcquirerEnterpriseId(),ticketOpen.getAmount(),ticketOpen.getInstitutyId(),ticketOpen.getCreateTime(),ticketOpen.getExpiryTime(),ticketOpen.getPaymentInterestType(),ticketOpen.getStatus(),ticketOpen.getUplinkAddress(),ticketOpen.getRemark());
    }
}
